﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CodeStash.Common.DataAccess.EntityFramework;
using System.Runtime.Serialization;

namespace CodeStash.Common.DTOS
{
    [DataContract]
    public class JSONPagesSearchResultCodeSnippet
    {


        public JSONPagesSearchResultCodeSnippet(Int32 totalAmountOfSnippetsThatMatchedSearch, List<JSONCodeSnippet> pagedMatchedSnippets, String errorMessage)
        {
            this.TotalAmountOfSnippetsThatMatchedSearch = totalAmountOfSnippetsThatMatchedSearch;
            this.PagedMatchedSnippets = pagedMatchedSnippets;
            this.ErrorMessage = errorMessage;
        }

        [DataMember]
        public Int32 TotalAmountOfSnippetsThatMatchedSearch { get; private set; }


        [DataMember]
        public List<JSONCodeSnippet> PagedMatchedSnippets { get; private set; }

        [DataMember]
        public String ErrorMessage { get; private set; }
        
    }
}
